const { response } = require('express');
const http = require('http');

//创建服务对象
const serve = http.createServer((request,response) => {
    response.setHeader('content-type', 'text/html;charset=utf-8');
    response.end('hello HTTP Server'+'你好 node服务器');
});

//3.监听端口，启动服务

serve.listen(4321 , () => {
        console.log('服务已启动……');
}, )